home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / listen.man < prev    next >
Encoding:
Text File  |  1989-04-21  |  1.7 KB  |  67 lines

  1.  
  2.  
  3.  
  4. LISTEN                C Library Procedures                 LISTEN
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      listen - listen for connections on a socket
  10.  
  11. SSYYNNOOPPSSIISS
  12.      lliisstteenn((ss,, bbaacckklloogg))
  13.      iinntt ss,, bbaacckklloogg;;
  14.  
  15. DDEESSCCRRIIPPTTIIOONN
  16.      To accept connections, a socket is first created with
  17.      _s_o_c_k_e_t(2), a willingness to accept incoming connections and
  18.      a queue limit for incoming connections are specified with
  19.      _l_i_s_t_e_n(2), and then the connections are accepted with
  20.      _a_c_c_e_p_t(2).  The _l_i_s_t_e_n call applies only to sockets of type
  21.      SOCK_STREAM or SOCK_SEQPACKET.
  22.  
  23.      The _b_a_c_k_l_o_g parameter defines the maximum length the queue
  24.      of pending connections may grow to.  If a connection request
  25.      arrives with the queue full the client may receive an error
  26.      with an indication of ECONNREFUSED, or, if the underlying
  27.      protocol supports retransmission, the request may be ignored
  28.      so that retries may succeed.
  29.  
  30. RREETTUURRNN VVAALLUUEE
  31.      A 0 return value indicates success; -1 indicates an error.
  32.  
  33. EERRRROORRSS
  34.      The call fails if:
  35.  
  36.      [EBADF]             The argument _s is not a valid descrip-
  37.                          tor.
  38.  
  39.      [ENOTSOCK]          The argument _s is not a socket.
  40.  
  41.      [EOPNOTSUPP]        The socket is not of a type that sup-
  42.                          ports the operation _l_i_s_t_e_n.
  43.  
  44. SSEEEE AALLSSOO
  45.      accept(2), connect(2), socket(2)
  46.  
  47. BBUUGGSS
  48.      The _b_a_c_k_l_o_g is currently limited (silently) to 5.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 14, 1986                          1
  64.  
  65.  
  66.  
  67.